package com.bt.lms.ui.action.course;

import com.bt.lms.ui.page.common.action.pageteaching.CourseLabLabAction;
import com.bt.lms.ui.page.course.AddPage;
import com.bt.lms.ui.page.course.CourseInfoList;
import javafx.event.Event;
import javafx.event.EventHandler;
import javafx.scene.layout.Pane;

/**
 * 课程管理
 * 新增课程按钮事件
 */
public class CourseInfoAddButtonAction implements EventHandler {


    private CourseInfoList pageCourseInfoList;
    public CourseInfoAddButtonAction(CourseInfoList pageCourseInfoList) {
        this.pageCourseInfoList = pageCourseInfoList;
    }

    @Override
    public void handle(Event event) {

        AddPage pageAddCourse = new AddPage();
        Pane pane = CourseLabLabAction.pageSkipInfo.getPane();
        Integer index = CourseLabLabAction.pageSkipInfo.getIndex();
        pane.getChildren().set(index,pageAddCourse);
    }
}
